package com.cmes.core.utils.dict;

/**
 * 数字类型字典
 *
 * @author Bruce.Gong
 * @since 1.0.0-SNAPSHOT
 */
public interface NumberDict<T extends Number & Comparable<T>> extends Dict<T> {

    /**
     * 键是否匹配
     *
     * @param code 字典键
     * @return true | false
     */
    @Override
    default boolean match(T code) {
        return code != null && getCode().compareTo(code) == 0;
    }

}